package com.ruicar.afs.cloud.parameter.commom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruicar.afs.cloud.parameter.commom.condition.ChannelVehicleInfoCondition;
import com.ruicar.afs.cloud.parameter.commom.condition.VehicleCondition;
import com.ruicar.afs.cloud.parameter.commom.condition.VehicleListCondition;
import com.ruicar.afs.cloud.parameter.commom.condition.VehicleTreeCondition;
import com.ruicar.afs.cloud.parameter.commom.entity.TsysVehicleBrand;
import com.ruicar.afs.cloud.parameter.commom.entity.TsysVehicleDetail;
import com.ruicar.afs.cloud.parameter.commom.entity.TsysVehicleModel;
import com.ruicar.afs.cloud.parameter.commom.vo.RuleAtomVO;
import com.ruicar.afs.cloud.parameter.commom.vo.VehicleStyleVO;
import com.ruicar.afs.cloud.parameter.commom.vo.VehicleVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @description: 款式
 * @author: sijun.yu
 * @date: 2020/5/15 10:00
 */
public interface TsysVehicleDetailMapper extends BaseMapper<TsysVehicleDetail> {

    public List<TsysVehicleBrand> getVehicleBrandList(@Param("query") VehicleCondition condition);

    public List<TsysVehicleModel> getVehiclemodelList(@Param("query") VehicleCondition condition);

    public List<TsysVehicleDetail> getVehicleStyleList(@Param("query") VehicleCondition condition);

    /**
     * 获取品牌名称
     *
     * @param condition
     * @return
     */
    List<TsysVehicleBrand> getBrandInfo(@Param("query") VehicleTreeCondition condition);


    IPage<List<VehicleVO>> getVehicleList(Page page, @Param("query") VehicleListCondition condition);
    /**
     * 获取品牌Tree
     *
     * @param condition
     * @return
     */
    List<VehicleTreeCondition> getBrandTree(@Param("query") VehicleTreeCondition condition);
    /**
     * 获取车型Tree
     *
     * @param condition
     * @return
     */
    List<VehicleTreeCondition> getModelTree(@Param("query") VehicleTreeCondition condition);

    //获取品牌信息【规则使用】
    public IPage<List<RuleAtomVO>> getBrandListByRule(Page page, @Param("query") VehicleCondition condition);
    //获取车型信息【规则使用】
    public IPage<List<RuleAtomVO>> getModelListByRule(Page page, @Param("query") VehicleCondition condition);
    //获取款式信息【规则使用】
    public IPage<List<RuleAtomVO>> getStyleListByRule(Page page, @Param("query") VehicleCondition condition);

    /**
     * 获取渠道主营品牌车型Tree
     *
     * @param condition
     * @return
     */
    ChannelVehicleInfoCondition getVehicleInfoTree(@Param("query") ChannelVehicleInfoCondition condition);
}
